<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use App\Models\Config;
use App\Libraries\EasyClass;


class ServerController extends BaseController
{
    use DispatchesJobs, ValidatesRequests;

    public $config=[];
    public $request;
    public $easyClass;
    public $easyWeChat;

    function __construct(){
        $this->easyClass = new EasyClass();
        $list = Config::all()->toArray();
        foreach ($list as $item) {
            $this->config[$item['mod']]=$item['config']?array_map('base64_decode',json_decode($item['config'],true)):array();
            //array_map('base64_decode',json_decode($_selfconfig,true))
        }
    }
}
